<?php

use Biz\cache\brand\FineGoodsTest;
use Biz\model\GoodsTestActivity\FineGoodsModel;

ini_set('display_errors', 1);
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);
ini_set('memory_limit', '1024M');
require_once '/data/wwwroot/g_vendor/autoload.php';

$ids = FineGoodsModel::select('id', ['activity_state[!]' => FineGoodsModel::STATE_DEL]);
echo '共有'.count($ids).'条数据'.PHP_EOL;
$cache_data = FineGoodsTest::hGetItems($ids);


$redis = new \Hhz\Redis\otherRedis(\hhz\constant\redis\redisKeys::KEY_B_OTHER_FINE_GOODS_TEST);

$i=1;
foreach ($cache_data as $id => $value) {
    $redis->set($id, $value);
    $i++;
    echo '第'.$i.'条数据更新完成-$id-'.$id.PHP_EOL;
}
echo 'success'.PHP_EOL;



